gmp dev files are installed. If files are missing, Makefile exits with a
message indicating that these tools will not be built, rather than an
error, which prevents Xen from building.
Signed-off-by: Vinnie Scarlata <vincent.r.scarlata@intel.com>
# Emulator tarball name
TPM_EMULATOR_TARFILE = tpm_emulator-0.2b.tar.gz
+GMP_HEADER = /usr/include/gmp.h
+
all: build
build: $(TPM_EMULATOR_DIR) $(VTPM_DIR) build_sub
patch -p1 <../vtpm.patch
build_sub:
- $(MAKE) -C $(TPM_EMULATOR_DIR)
- $(MAKE) -C $(VTPM_DIR)
+ if [ -e $(GMP_HEADER) ]; then \
+ $(MAKE) -C $(VTPM_DIR); \
+ if [ "$(BUILD_EMULATOR)" = "y" ]; then \
+ $(MAKE) -C $(TPM_EMULATOR_DIR); \
+ fi \
+ else \
+ echo "*** Unable to build VTPMs. libgmp could not be found."; \
+ fi
+
-include $(DEP_FILES)
+BUILD_EMULATOR = n
+
# Make sure these are just rules
.PHONY : all build install clean
include $(XEN_ROOT)/tools/vtpm_manager/Rules.mk
SUBDIRS = crypto tcs util manager
+OPENSSL_HEADER = /usr/include/openssl/crypto.h
all: build
build:
- @set -e; for subdir in $(SUBDIRS); do \
- $(MAKE) -C $$subdir $@; \
- done
+ if [ -e $(OPENSSL_HEADER) ]; then \
+ @set -e; for subdir in $(SUBDIRS); do \
+ $(MAKE) -C $$subdir $@; \
+ done; \
+ else \
+ echo "*** Cannot build vtpm_manager: OpenSSL developement files missing."; \
+ fi
install: build
@set -e; for subdir in $(SUBDIRS); do \